
export default function (file) {
    return new Promise(function (resolve, reject) {
        const fileReader = new FileReader();
        fileReader.readAsDataURL(file)
        fileReader.onload = function () {
            // console.log(this.result);
            resolve(this.result)
        }
        fileReader.onerror = function () {
            reject("转化失败");
        }
    })
}